home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
tjgold.zip
/
INSTALL.003
/
DEMWIN1.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-05-29
|
2KB
|
68 lines
{--------------------------------------------------------------------------}
{ Product: TechnoJock's Turbo Toolkit GOLD }
{ }
{ TTT GOLD - DEMO PROGRAM }
{ }
{ Copyright 1986-1995 TechnoJock Software, Inc. }
{ All Rights Reserved }
{ Restricted by License }
{--------------------------------------------------------------------------}
{Description: DEMWIN1.PAS
Illustrates basic window management
}
program DemWin1;
{$I GOLDFLAG.INC}
uses DOS,CRT, GoldAttr, GoldFast, GoldWin, GoldKey, GoldMisc, GoldStr;
var
WinHandle: integer;
procedure SetScreen;
{}
begin
clrscr;
SetBlinking(false);
Clear(WhiteOnBlue,chr(177));
ClearLine(1,YellowOnBlue);
WriteCenter(1,UseTint,'TTT Gold!');
ClearLine(25,YellowOnRed);
WriteCenter(25,UseTint,'Press Esc to finish or click on [■].');
end; { SetScreen }
begin
{$IFOPT D+}
HeapRecord;
{$ENDIF}
SetScreen;
WinHandle := WinCreate(5,5,75,20,1);
WinSetType(WinHandle,WMove);
WinSetTitle(WinHandle,' My First Window ');
WinSetScrollType(WinHandle,BothScroll);
WinDisplay(WinHandle);
(*
LineWrap := true; {tells Gold to automatically wrap text to next line}
SetWinIgnore(true); {Tells Gold to ignore the local window coordinates}
ShadowAttr := 11; {controls the shadow color -- accepts any byte value}
ShadowType := 1; {accepts values 0 to 3, controls shadow position}
*)
WritePlain(1,1,'This is a very long string which should wrap to the next line if LineWrap is true');
WinDrawAll;
MouseShow(true);
{now process keystrokes}
with KeyVars do
repeat
GetInput;
if IsWinKey(LastKey,LastX,LastY) then
WinProcessKey(LastKey,LastX,LastY);
until (LastKey = 27) or (LastKey = 600);
MouseShow(false);
WinDispose(WinHandle);
{$IFOPT D+}
HeapCheck;
{$ENDIF}
end.